<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改任务')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-taskMission-edit" th:object="${taskPostpone}">
        <input id="postponeId" name="postponeId" type="hidden" th:field="*{postponeId}"/>
        <div class="form-group">
            <label class="col-sm-3 control-label">任务标题：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="missionTitle" id="missionTitle" th:field="${taskPostpone.taskMission.missionTitle}" required readonly="true">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label ">延期至：</label>
            <div class="col-sm-8">
                <input class="form-control" type="date" name="postponeTime" id="postponeTime"  th:value="${#dates.format(taskPostpone.postponeTime,'yyyy-MM-dd')}" required>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">延期理由：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="postponeText" id="postponeText" th:field="${taskPostpone.postponeText}" required>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">申请人：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="infoId" id="infoId" th:field="${taskPostpone.personInfo.infoName}" required readonly="true">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
    var prefix = ctx + "task/postpone";

    $("#form-taskMission-edit").validate({
        onkeyup: false,
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-taskMission-edit').serialize());
        }
    }
</script>
</body>
</html>
